const nodata = require('../tw-lib-base/no-data/props')
const commonProps = require('../tw-lib-base/chart/common-props')
// const axisProps = require('../tw-lib-base/chart/axis-props')
// const datazoomProps = require('../tw-lib-base/chart/datazoom-props')
const tooltipProps = require('../tw-lib-base/chart/tooltip-props')

module.exports = {
  ...commonProps,

  // ...axisProps,
  // ...datazoomProps,
  ...tooltipProps,

  data: {
    type: Array,
    default () {
      return [
        {
          "name": "<80",
          "value": 14
        },
        {
          "name": "80-85",
          "value": 36
        },
        {
          "name": "85-90",
          "value": 28
        },
        {
          "name": "90-100",
          "value": 22
        }
      ]
    },
    name: '图表数据集',
    filedType: 'api'
  },
  height: {
    type: String,
    default: '280px',
    name: '图表容器高度',
    filedType: 'string'
  },

  showTitle: {
    type: Boolean,
    default: false,
    name: '显示标题',
    filedType: 'switch'
  },
  // 图例
  showLegend: {
    type: Boolean,
    default: false,
    name: '显示图列',
    filedType: 'switch'
  },
  titleText: {
    type: String,
    default: '',
    name: '图表标题',
    filedType: 'string'
  },
  subtitleText: {
    type: String,
    default: '图表副标题',
    name: '图表副标题',
    filedType: 'string'
  },
  titleTop: {
    type: String,
    default: '40%',
    name: '标题顶部位置',
    filedType: 'string'
  },
  titleLeft: {
    type: String,
    default: '49.5%',
    name: '图表副标题',
    filedType: 'string'
  },
  titleColor: {
    type: String,
    default: '#333',
    name: '主标题颜色',
    filedType: 'color'
  },
  subtitleColor: {
    type: String,
    default: '#aaa',
    name: '副标题颜色',
    filedType: 'color'
  },
  titleFontSize: {
    type: String,
    default: '18',
    name: '主标题字体大小',
    filedType: 'string'
  },
  subtitleFontSize: {
    type: String,
    default: '12',
    name: '副标题字体大小',
    filedType: 'string'
  },
  innerRadius: {
    type: String,
    default: '60%',
    name: '环图内半径',
    filedType: 'string'
  },
  outerRadius: {
    type: String,
    default: '80%',
    name: '环图外半径',
    filedType: 'string'
  },
  showLabel: {
    type: Boolean,
    default: false,
    name: '显示文本标签',
    filedType: 'switch'
  },
  triggerType: {
    type: String,
    default: 'item',
    name: '触发类型',
    filedType: 'string'
  },

  labelColor: {
    type: String,
    default: '#aaa',
    name: '标签文字颜色',
    filedType: 'color'
  },
  labelFontSize: {
    type: String,
    default: '18',
    name: '标签文字字体',
    filedType: 'string'
  },

  showAxis: {
    type: Boolean,
    default: false,
    name: '显示坐标轴',
    filedType: 'switch'
  },

  ...nodata
}
